package com.example.toy.core.index;

import com.example.toy.core.dataset.BigCollection;
import com.example.toy.core.dataset.BigPairCollection;
import com.example.toy.core.record.key.ToyRecordKey;
import org.apache.hadoop.fs.Path;

import java.util.Iterator;

/**
 * ToyIndexDictionary
 *
 * @author shenbing
 * @date 2021/12/28
 */
public interface ToyIndexDictionary {

  void addIndex(BigCollection<ToyRecordKey> key, Path path);

  BigPairCollection<ToyRecordKey, Iterator<Path>> findByIndex(BigCollection<ToyRecordKey> key);

  void removeIndex(BigCollection<ToyRecordKey> key);

  void removeIndex(BigCollection<ToyRecordKey> key, Path path);

  void compact();
}
